-
Notifications
You must be signed in to change notification settings - Fork 0
Feature: Optional packet, play packet, configuration packet #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…r code to use the new config
…age in repo readme)
…to skyvence/chunks
…to skyvence/chunks
…to skyvence/chunks
…to skyvence/chunks
…to skyvence/chunks
… speed, no fov modifier
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces significant architectural improvements for handling Minecraft protocol communication, including world data management, region file support, and chunk streaming capabilities. The changes restructure packet handling with a cleaner separation between clientbound and serverbound packets, implement NBT parsing for world data, and add a configuration system with world management features.
Key Changes:
- Implemented world data loading system with NBT parsing and region file support for chunk streaming
- Restructured packet system with separation of clientbound/serverbound packets and new packet router architecture
- Added configuration management system with world settings and server properties
Reviewed Changes
Copilot reviewed 85 out of 117 changed files in this pull request and generated 5 comments.
Show a summary per file
File | Description |
---|---|
src/world/query.cpp | New world query system for loading chunks from region files with NBT decompression |
src/world/manager.cpp | World manager implementation with level.dat loading and gzip/zlib decompression |
src/server.cpp | Updated server initialization to load world data and integrate new config system |
src/networking/networkPacketRouter.cpp | New centralized packet routing system replacing old router |
src/networking/packet/clientbound/*.cpp | New clientbound packet implementations for game state management |
src/networking/packet/serverbound/*.cpp | New serverbound packet handlers for client communication |
src/lib/nbtParser.cpp | NBT binary parser for Minecraft's Named Binary Tag format |
src/lib/config.cpp | New configuration management system |
include/world/world.hpp | World management API with LevelDat and ChunkData structures |
include/network/server.hpp | Updated server interface with world and config integration |
Makefile | Build system updates for new directory structure and zlib dependency |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
getTagValue("DifficultyLocked", dataStruct.DifficultyLocked); | ||
getTagValue("GameType", dataStruct.GameType); | ||
getTagValue("generatorName", dataStruct.generatorName); | ||
getTagValue("generatorVersion", dataStruct.generatorVersiona); |
Copilot
AI
Oct 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected spelling of 'generatorVersiona' to 'generatorVersion'.
getTagValue("generatorVersion", dataStruct.generatorVersiona); | |
getTagValue("generatorVersion", dataStruct.generatorVersion); |
Copilot uses AI. Check for mistakes.
// Level (VarInt) - current experience level | ||
buf.writeVarInt(0); | ||
// Level (VarInt) - current experience level | ||
buf.writeVarInt(5); |
Copilot
AI
Oct 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Magic number 5 is used without explanation. Consider using a named constant like 'DEFAULT_EXPERIENCE_LEVEL' to clarify the intent.
Copilot uses AI. Check for mistakes.
buffer.writeVarInt(1); | ||
buffer.writeString("minecraft"); | ||
buffer.writeString("core"); | ||
buffer.writeString("1.21.5"); |
Copilot
AI
Oct 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardcoded version string '1.21.5' should be retrieved from the server configuration to ensure consistency with the configured game version.
Copilot uses AI. Check for mistakes.
// server.getNetworkManager().getOutgoingQueue()->push(levelChunkPacket); | ||
|
||
} else if (packet->getId() == 0x2B) { | ||
// Playere loaded |
Copilot
AI
Oct 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected spelling of 'Playere' to 'Player'.
// Playere loaded | |
// Player loaded |
Copilot uses AI. Check for mistakes.
#include <vector> | ||
|
||
struct RegistryEntry { | ||
std::string name; |
Copilot
AI
Oct 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 'protocol_id' field in RegistryEntry struct lacks documentation. Add a comment explaining its purpose and valid range in the Minecraft protocol.
std::string name; | |
std::string name; | |
// Unique integer identifier for this entry in the Minecraft protocol. | |
// Must be a non-negative integer, unique within its registry, as defined by the protocol specification. |
Copilot uses AI. Check for mistakes.
…uilding and working as expected
New clientbound packets (added)
New serverbound packets (added)
Packets moved/renamed
Existing packet implementations modified
Removed legacy packet files (superseded by new structure)